<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
<title>第五套人民币八同号预定窗口</title>
<meta name="keywords" content="第五套人民币八同号预定窗口">
<meta name="description" content="第五套人民币八同号预定窗口">
<link rel="stylesheet" href="/static/css/weui.css"/>
<link rel="stylesheet" href="/static/css/weui2.css"/>

</head>
<body>
<body ontouchstart style="background-color: #f8f8f8;">
    <form id="form">
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">收件人:</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" name="name" required value="" id="name" placeholder="输入收件人" emptyTips="请输入收件人" notMatchTips="请输入正确的收件人">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">省市县:</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" name="city" required value="" id='ssx' placeholder="选择省市县" emptyTips="请选择省市县" notMatchTips="请选择省市县">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">地址:</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" name="address" required value="" id="address" placeholder="输入详细地址" emptyTips="请输入详细地址" notMatchTips="请输入正确的地址">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">手机号:</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="tel" name="tel" id="tel" required pattern="^(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9])\d{8}$" maxlength="11" placeholder="输入手机号" emptyTips="请输入手机号" notMatchTips="请输入正确的手机号">
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_warn"></i>
                </div>
            </div>
        </div>
        <div class="weui_cells_title">第五套人民币八同号预定，请您选择中意的套餐（最少选1项）</div>
        <div class="weui_cells weui_cells_checkbox">
         
             
            <label class="weui_cell weui_check_label" for="s11">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s11" value="第五套人民币8同号钞1套496元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第五套人民币8同号钞1套496元（含10元邮费）</p>
                </div>
            </label>
                    
            <label class="weui_cell weui_check_label" for="s12">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s12" value="第五套人民币8同号钞2套982元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第五套人民币8同号钞2套982元（含10元邮费）</p>
                </div>
            </label>
                    
            <label class="weui_cell weui_check_label" for="s13">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s13" value="第五套人民币8同号5套2440元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第五套人民币8同号5套2440元（含10元邮费）</p>
                </div>
            </label>
                    
            <label class="weui_cell weui_check_label" for="s14">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s14" value="第四套人民币4同号1套898元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第四套人民币4同号1套898元（含10元邮费）</p>
                </div>
            </label>
                    
            <label class="weui_cell weui_check_label" for="s15">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s15" value="第四套人民币4同号2套1786元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第四套人民币4同号2套1786元（含10元邮费）</p>
                </div>
            </label>
                    
            <label class="weui_cell weui_check_label" for="s16">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s16" value="第五套1套+第四套1套1384元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第五套1套+第四套1套1384元（含10元邮费）</p>
                </div>
            </label>
                    
            <label class="weui_cell weui_check_label" for="s17">
                <div class="weui_cell_hd">
                    <input type="checkbox" name="checkbox1[]" class="weui_check" id="s17" value="第五套2套+第四套2套2758元（含10元邮费）">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>第五套2套+第四套2套2758元（含10元邮费）</p>
                </div>
            </label>
                                    
        </div>
        <div class="weui_cells_title">备注</div>
        <div class="weui_cell">
            <p>货币发行单位：中国人民银行<br>
提交成功暨表示预定成功，请保持电话畅通并留意你的快件（2—5天送达）。<br>
收到后请打开包装盒子验货，确认无误再付款给快递员，如果快递员不给打开验货，你可以拒绝付款！</p>
        </div>
        <div class="weui_cell weui_cells_checkbox">
            <label class="weui_cell weui_check_label" for="s111">
                <div class="weui_cell_hd">
                    <input type="checkbox" class="weui_check" name="checkbox11" id="s111">
                    <i class="weui_icon_checked"></i>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <p>我已阅读公告确认预定并接受邮递服务。</p>
                </div>
            </label>                     
        </div>
        <div class="weui_btn_area">
            <a id="formSubmitBtn" href="javascript:replysub();" class="weui_btn weui_btn_primary">提交</a>
        </div>
    </form>
<br>
<br>
    <div class="weui-footer">
        <p class="weui-footer-text">Copyright &copy; 2006-2017</p>
    </div>
<script src="/static/js/zepto.min.js"></script>
<script src="/static/js/picker.js"></script>
<script src="/static/js/picker-city.js"></script>
<script>
$(function(){
    $("#ssx").cityPicker({
            title: "选择省市县"
    });
});

function replysub(){
    var username = $('#name').val();
    var address = $('#address').val();
    var mobile = $('#tel').val();
    var city = $('#ssx').val();
    if(!username) {
        alert('收件人不能为空');
        return;
    }
    if(!city) {
        alert('省市县不能为空');
        return;
    }
    if(!address) {
        alert('地址不能为空');
        return;
    }
    if(!mobile.match(/^1[0-9][0-9]{9}$/)) {
        alert('手机号码格式不正确');
        return;
    }
    if($("input[name='checkbox1[]']:checked").length < 1){
        alert('套餐最少选一项');
        return;
    }
    if (!$('#s111').is(':checked')) {
        alert('请确认公告');
        return;
    }
    $.ajax({
        url:"{:url('Index/json_add_orders')}",
        type:"POST",
        data:$("#form").serialize(),
        success: function(data) {
            // console.log(data)
            if(data.code) {
                // alert('提交成功');
                window.location.href = "{:url('Index/o_success')}";
            }else{
                alert(data.msg);
            }
                    
        }
    }); 


}   
    
</script>
</body>
</html>






</body>
</html> 